package com.youlu.campus.entity.recycle.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author : [dengbo]
 * @className : RecycleItemSaveDTO
 * @description : [商品保存]
 * @createTime : [2022/6/23 14:03]
 */
@Data
public class RecycleItemSaveDTO {
    private String id;
    @NotBlank(message = "商品名称不能为空")
    private String name;
    @NotBlank(message = "商品图片不能为空")
    private String imageUrl;
    @NotBlank(message = "商品详情不能为空")
    private String detail;
    @NotNull(message = "商品价格不能为空")
    private Integer price;
    @NotNull(message = "商品图片不能为空")
    @Range(min = 0, max = 1, message = "上下架类型错误")
    private Integer onSale;
}
